package com.pf.business.upload.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.pf.business.converter.BillTypeConverter;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author PanFei
 * @version 1.0.0
 * @createTime 2023/7/16 16:11
 */
@Data
public class UploadBill {

    /**
     * 账单编号
     */
    @ExcelProperty("*账单编号")
    private String billNo;

    /**
     * 账单描述信息
     */
    @ExcelProperty("*账单描述")
    @NotEmpty(message = "【账单描述】不能为空；")
    @Length(max = 10, message = "【账单描述】最大长度不能超过{max}；")
    private String billDesc;

    /**
     * 账单类型
     */
    @ExcelProperty(value = "*账单类型", converter = BillTypeConverter.class)
    @NotNull(message = "【账单类型】不能为空；")
    private Integer billType;

    /**
     * 账单金额
     */
    @ExcelProperty("*账单金额")
    @NotNull(message = "【账单金额】不能为空；")
    private BigDecimal billAmount;

    /**
     * 账单日期
     */
    @ExcelProperty("*账单日期")
    @NotNull(message = "【账单日期】不能为空；")
    private Date billDate;

    /**
     * 备注
     */
    @ExcelProperty("备注")
    @Length(max = 20, message = "【备注】最大长度不能超过{max}")
    private String remark;
}
